import { TypeOrmModule } from '@nestjs/typeorm';
import config from '../config/config';

// let 
export default {
 init:TypeOrmModule.forRoot({
    type: 'mysql',
    host:config.MYSQL_HOST ,
    port: config.MYSQL_PORT,
    username: config.MYSQL_USER,
    password: config.MYSQL_PASSWORD,
    database:config.MYSQL_DATABASE,
    autoLoadEntities:true,
    synchronize: true,
    logging:['warn','error','info'],
    logger:'file',
    maxQueryExecutionTime:1000,
  }),
}
